<template>
    <div>
        <router-view></router-view>
    </div>

    <router-view id="app">
      <Navbar v-if="showNavbar" />
    </router-view>
  
</template>

<script setup>
import { computed } from 'vue';
import { RouterView } from 'vue-router';
import Navbar from './components/Navbar.vue';

//计算属性，根据当前路由判断是否显示 Navbar
const showNavbar = computed(() => {
  return route.path !== '/login' && route.path !== '/register';
});


</script>
